package main

import (
	"fmt"
	"regexp"
)

func main() {
	str := "abc a7c mfc cat act 8ca azc cba nba ncaa aAc"
	ret := regexp.MustCompile(`a.c`) //解析，编译正则表达式
	findallmatch(str, ret)
	ret = regexp.MustCompile(`a[^0-9a-z]c`)
	findallmatch(str, ret)

}

func findallmatch(str string, ret *regexp.Regexp) {
	fmt.Println(ret.FindAllStringSubmatch(str, -1))
}
